<!doctype html>
<html lang="en">
  <head>
    <meta charset="utf-8" />
    <title>Subgrid: gap inherited</title>
    <link rel="stylesheet" href="../styles.css" />
    <style>
      * {
        box-sizing: border-box;
      }

      .grid {
        border: 2px solid #f76707;
        border-radius: 5px;
        background-color: #fff4e6;
      }

      .item {
        border: 2px solid #ffa94d;
        border-radius: 5px;
        background-color: #ffd8a8;
        color: #d9480f;
      }

      .subitem {
        background-color: rgb(40 240 83);
      }
    </style>

    <style class="editable">
      .grid {
        display: grid;
        grid-template-columns: repeat(9, 1fr);
        grid-template-rows: repeat(4, minmax(100px, auto));
        gap: 20px;
      }

      .item {
        display: grid;
        grid-column: 2 / 7;
        grid-row: 2 / 4;
        grid-template-columns: subgrid;
        grid-template-rows: subgrid;
      }

      .subitem {
        grid-column: 3 / 6;
        grid-row: 1 / 3;
      }

      .subitem2 {
        background-color: rgb(0 0 0 / 0.5);
        grid-column: 2;
        grid-row: 1;
      }
    </style>
  </head>

  <body>
    <section class="preview">
      <div class="grid">
        <div class="item">
          <div class="subitem"></div>
          <div class="subitem2"></div>
        </div>
      </div>
    </section>

    <textarea class="playable playable-css" style="height: 350px">
.grid {
  display: grid;
  grid-template-columns: repeat(9, 1fr);
  grid-template-rows: repeat(4, minmax(100px, auto));
  gap: 20px;
}

.item {
  display: grid;
  grid-column: 2 / 7;
  grid-row: 2 / 4;
  grid-template-columns: subgrid;
  grid-template-rows: subgrid;
  row-gap: 0;
}

.subitem {
  grid-column: 3 / 6;
  grid-row: 1 / 3;
}

.subitem2 {
  background-color: rgb(0 0 0 / .5);
  grid-column: 2;
  grid-row: 1;
}</textarea
    >

    <textarea class="playable playable-html" style="height: 200px">
<div class="grid">
  <div class="item">
    <div class="subitem"></div>
    <div class="subitem2"></div>
  </div>
</div></textarea
    >

    <div class="playable-buttons">
      <input id="reset" type="button" value="Reset" />
    </div>
  </body>
  <script src="../playable.js"></script>
</html>
